<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <link type="text/css" rel="stylesheet" href="resources/css/umat.css" />
        <f:facet name="first">
            <meta http-equiv="X-UA-Compatible" content="EmulateIE8" />
            <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
            <title>Registration settings</title>
        </f:facet>
        <style type="text/css">
            .ui-layout-north {
                z-index:20 !important;
                overflow:visible !important;;
            }

            .ui-layout-north .ui-layout-unit-content {
                overflow:visible !important;
            }
        </style>
    </h:head>
    <h:body>
        <p:layout fullPage="true">
            <p:layoutUnit id="north" position="north" size="50" resizable="false" closable="false" collapsible="false" >


            </p:layoutUnit>

            <p:layoutUnit id="center" position="center">
                    <h:form id="upload_form">
                        <p:fileUpload fileUploadListener="#{FileUploadManager.handleWebUpload}"
                                      mode="advanced" 
                                      update="messages"
                                      sizeLimit="100000"
                                      invalidFileMessage="Only .xml files are allowed"
                                      allowTypes="/(\.|\/)(xml)$/" 
                                      uploadLabel="Upload tree xml"
                                      style="margin-bottom: 25px"/>

                        <p:growl id="messages" showDetail="true"/>
                    </h:form>

                <h:form id="weights_form">
                    <h:outputText value="Please set the importance of each field in order to compute the layout for the user"/>

                    <p:panelGrid columns="2" style="margin-bottom: 25px; margin-top:20px">
                        <h:outputLabel for="aeh" value="Aeh:"/>
                        <p:inputText id="aeh" value="#{RegistrationSettingsController.aeh}"/>
                        <h:outputLabel for="athExpert" value="Authority Expert:"/>
                        <p:inputText id="athExpert" value="#{RegistrationSettingsController.expert}" />
                        <h:outputLabel for="athHelp" value="Authority Help:"/>
                        <p:inputText id="athHelp" value="#{RegistrationSettingsController.a_help}"/>
                        <h:outputLabel for="approved" value="AEH Approved:"/>
                        <p:inputText id="approved" value="#{RegistrationSettingsController.aeh_approved}"/>
                        <h:outputLabel for="gSep" value="Gender separation:"/>
                        <p:inputText id="gSep" value="#{RegistrationSettingsController.gender_separation}"/>
                        <h:outputLabel for="lPresence" value="Language Presence:"/>
                        <p:inputText id="lPresence" value="#{RegistrationSettingsController.presence}"/>
                        <h:outputLabel for="lCulture" value="Language Culture:"/>
                        <p:inputText id="lCulture" value="#{RegistrationSettingsController.culture}"/>
                        <h:outputLabel for="lHeirarchy" value="Lesson Hierarchy:"/>
                        <p:inputText id="lHeirarchy" value="#{RegistrationSettingsController.hierarchy}"/>
                        <h:outputLabel for="lHelp" value="Lesson Help:"/>
                        <p:inputText id="lHelp" value="#{RegistrationSettingsController.l_help}"/>
                        <h:outputLabel for="lAccess" value="Lesson Access:"/>
                        <p:inputText id="lAccess" value="#{RegistrationSettingsController.access}"/>
                        <h:outputLabel for="lChoice" value="Lesson Choice:"/>
                        <p:inputText id="lChoice" value="#{RegistrationSettingsController.choice}"/>
                        <h:outputLabel for="lAmb" value="Lesson Ambiguity:"/>
                        <p:inputText id="lAmb" value="#{RegistrationSettingsController.ambiguity}"/>
                        <h:outputLabel for="dataSec" value="Data Security:"/>
                        <p:inputText id="dataSec" value="#{RegistrationSettingsController.security }"/>
                    </p:panelGrid>
                    <p:commandButton value="Submit" actionListener="#{RegistrationSettingsController.weights}"/>
                </h:form>
            </p:layoutUnit>
            <p:layoutUnit id="west" position="west" size="250" header="Navigation" resizable="true" closable="false" collapsible="true">
                <p:panelGrid columns="1" style="width: 100%" >
                    <h:link value="Home" outcome="goToHome"/>
                    <h:link value="RegistrationSettings" outcome="goToRegistrationSettings"/>
                    <h:link value="Registration" outcome="goToLogin"/>
                </p:panelGrid>
            </p:layoutUnit>
        </p:layout>
    </h:body>
</html>
